#ifndef QWIDGETPROPERTY_P_H
#define QWIDGETPROPERTY_P_H

// ONLY INCLUDE THIS IN .CPP FILES

#include "private/QProperty_p.h"

#include <QPointer>
#include <QWidget>

namespace QPE {

class QWidgetPropertyPrivate : public QPropertyPrivate {
public:
	//! The widget to show
	QPointer<QWidget> Widget;

	//! Constructor passing name and type
	QWidgetPropertyPrivate(const QString& name, QVariant::Type type, QWidget* widget = NULL)
		: QPropertyPrivate(name, type), Widget(widget) {}

	//! Constructor
	QWidgetPropertyPrivate()
		: QPropertyPrivate(), Widget(NULL) {}

	//! Destructor
	~QWidgetPropertyPrivate() {
		if(Widget)
			Widget->deleteLater();
	}
};

}

#endif // QWIDGETPROPERTY_P_H
